<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/_includes.jsp" %>
<jsp:include page="/WEB-INF/jsp/common/_scripts.jsp" />
<!DOCTYPE html>
<html>
<head>
<title>Channel Edit</title>
</head>
<body>
<div class="ui grid">
	<div class="row">
		<div class="column">
			<div class="ui two column grid">
				<div id="container" class="thirteen wide column">
					<div class="alert alert-success w200 center-block text-center " style="display: none; " role="alert"></div>
					<ol class="breadcrumb">
						<li></li>
					</ol>
					<form class="form-horizontal" id="addForm" method="post" action="/channel/edit">
						<input type="hidden" name="id" value="${channel.id }">
						<input type="hidden" name="level" value="${channel.level }">
						<div class="form-group">
								<label class="col-sm-2 control-label">站点</label>
								<div class="col-sm-5">
									<select class="form-control" name="siteId">
										<option value="">请选择站点</option>
										<c:forEach items="${initSiteList }" var="site">
											<option value="${site.id}"
												<c:if test="${channel.siteId == site.id }">selected="selected"</c:if>>${site.siteName}</option>
										</c:forEach>
									</select>
								</div>
							</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">栏目编号</label>
							<div class="col-sm-5">
								<input type="text" class="form-control" id="code" name="code" value="${channel.code }" placeholder="输入栏目编号">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">栏目名称</label>
							<div class="col-sm-5 desc">
								<input type="text" class="form-control" id="name" name="name" value="${channel.name }" placeholder="输入栏目名称">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">排序号</label>
							<div class="col-sm-5">
								<input type="text" class="form-control" id="priority" name="priority" value="${channel.priority }" placeholder="输入排序号">
							</div>
						</div>
						<div class="form-group">
								<label class="col-sm-2 control-label">分类编号</label>
								<div class="col-sm-5">
									<input type="text" class="form-control" id="categoryCode"
										name="categoryCode" value="${channel.categoryCode }" placeholder="输入内容分类编号">
								</div>
							</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">访问路径</label>
							<div class="col-sm-5">
								<input type="text" class="form-control" id="channelPath" name="channelPath" value="${channel.channelPath }" placeholder="输入访问路径">
							</div>
						</div>
					
						<c:choose>
						   <c:when test="${channel.hasContent==0}">	
						         <div class="form-group">
								<label class="col-sm-2 control-label">是否有内容</label>
								<label class="col-sm-2 control-label">
							                   是<INPUT   type="radio"    name="hasContent"   value="1" />  &nbsp; &nbsp; &nbsp;
							                   否<INPUT   type="radio"   name="hasContent"   value="0"    checked="checked" />    
								</label>      
							    </div>
						   </c:when>
						   <c:when test="${channel.hasContent==1}">	
							    <div class="form-group">
								<label class="col-sm-2 control-label">是否有内容</label>
								<label class="col-sm-2 control-label">
							       	是<INPUT   type="radio"    name="hasContent"   value="1"   checked="checked" />  &nbsp;&nbsp;&nbsp;
							       	否<INPUT   type="radio"   name="hasContent"   value="0" />    
								</label>      
							   </div>
						 </c:when>
					</c:choose>
					
					
					<c:choose>
						   <c:when test="${channel.isDisplay==0}">	
						        <div class="form-group">
								<label class="col-sm-2 control-label">是否显示</label>
								<label class="col-sm-2 control-label">
							        	是<INPUT   type="radio"    name="isDisplay"   value="1" />  &nbsp; &nbsp; &nbsp;
							        	否<INPUT   type="radio"   name="isDisplay"   value="0"    checked="checked"  />    
								</label>      
							    </div>
						   </c:when>
						   <c:when test="${channel.isDisplay==1}">	
						        <div class="form-group">
								<label class="col-sm-2 control-label">是否显示</label>
								<label class="col-sm-2 control-label">
							        	是<INPUT   type="radio"   name="isDisplay"   value="1"    checked="checked"/>  &nbsp; &nbsp; &nbsp;
							        	否<INPUT   type="radio"   name="isDisplay"   value="0" />    
								</label>      
							    </div>
					     </c:when>
					</c:choose>
						
								<div class="form-group" id="js_submit">
							<div class="col-sm-offset-3 col-sm-2">
								<button type="submit" class="btn btn-success">提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="/static/vendor/jquery.validate/jquery.validate.js"></script>
<script type="text/javascript" src="/static/js/channel/add.js"></script>
<script type="text/javascript">
	$(function(){
		$("ol.breadcrumb>li").text("当前目录："+window.parent.nodeName);
	});
</script>
</body>
</html>